add_custom_target(libc_sys_time_unittests)

add_libc_unittest(
  utimes_test
  SUITE
    libc_sys_time_unittests
  SRCS
    utimes_test.cpp
  DEPENDS
    libc.hdr.fcntl_macros
    libc.hdr.sys_stat_macros
    libc.src.errno.errno
    libc.src.fcntl.open
    libc.src.sys.time.utimes
    libc.src.unistd.close
    libc.src.unistd.read
    libc.src.unistd.write
    libc.src.stdio.remove
    libc.src.sys.stat.stat
    libc.test.UnitTest.ErrnoCheckingTest
)

add_libc_unittest(
  setitimer_test
  SUITE
    libc_sys_time_unittests
  SRCS
    setitimer_test.cpp
  DEPENDS
    libc.include.signal
    libc.src.sys.time.setitimer
    libc.src.signal.sigaction
    libc.src.signal.sigemptyset
    libc.src.__support.common
    libc.src.errno.errno
    libc.test.UnitTest.ErrnoCheckingTest
    libc.test.UnitTest.ErrnoSetterMatcher
)

add_libc_unittest(
  getitimer_test
  SUITE
    libc_sys_time_unittests
  SRCS
    getitimer_test.cpp
  DEPENDS
    libc.src.sys.time.getitimer
    libc.src.__support.common
    libc.src.errno.errno
    libc.test.UnitTest.ErrnoCheckingTest
    libc.test.UnitTest.ErrnoSetterMatcher
)
